/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.view;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class PanelTambahAnggota extends JPanel {
     private JLabel labelKodeAnggota ;
     private JTextField textKodeAnggota ;
     private JLabel labelNama ;
     private JTextField textNama ;
     private JButton tombolSimpan ;
     private JButton tombolBatal ;


         public PanelTambahAnggota (){
         this.setSize(400,300);
         setLayout(null);

         labelKodeAnggota =new JLabel("Nama Anggota ");
         labelKodeAnggota.setBounds(50, 50, 150, 40);
         add(labelKodeAnggota);

          textKodeAnggota=new JTextField(20);
          textKodeAnggota.setBounds(150, 60, 150, 20);
          add(textKodeAnggota);

         labelNama  =new JLabel("Kode Anggota ");
         labelNama .setBounds(50, 80, 150, 40);
         add(labelNama);

         textNama=new JTextField(20);
         textNama.setBounds(150, 90, 150, 20);
         add(textNama);

            tombolSimpan = new JButton("SIMPAN ");
        tombolSimpan.setBounds(100, 150, 100, 20);
        add(tombolSimpan);
    tombolSimpan.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
               tombolSimpanCommand();
            }
        });

       tombolBatal = new JButton("BATAL ");
       tombolBatal.setBounds(250, 150, 100, 20);
       add(tombolBatal);
       tombolBatal.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
            cancelCommand();
            }
        });
}

    private void cancelCommand(){
        System.exit(0);
    }
    private void tombolSimpanCommand() {
                throw new UnsupportedOperationException("Not yet implemented");
            }
    }